package com.ins1st.plus.config;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @program: ins1st-plus
 * @description: mp配置
 * @author: coderSun
 * @create: 2019-09-06 16:30
 **/
@Configuration
public class MybatisPlusCfg {

    /**
     * mybatis-plus分页插件
     */
    @Bean
    public PaginationInterceptor paginationInterceptor() {
        PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
        paginationInterceptor.setDialectType("mysql");
        System.err.println("PaginationInterceptor be inited...");
        return paginationInterceptor;
    }
}
